package com.gitee.l0km.casban.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.gitee.l0km.common.spring.core.annotation.AliasFor;

/**
 * 定义类扫描范围
 * @author guyadong
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface CasbanScan {
	/**
	 * Alias for {@link #basePackages}.
	 * <p>Allows for more concise annotation declarations if no other attributes
	 * are needed &mdash; for example, {@code @ComponentScan("org.my.pkg")}
	 * instead of {@code @ComponentScan(basePackages = "org.my.pkg")}.
	 */
	@AliasFor(AnnotationFieldNames.BASE_PACKAGES)
	String[] value() default {};
	/**
	 * Base packages to scan for annotated components.
	 * <p>{@link #value} is an alias for (and mutually exclusive with) this
	 * attribute.
	 * <p>Use {@link #basePackageClasses} for a type-safe alternative to
	 * String-based package names.
	 */
	@AliasFor(AnnotationFieldNames.VALUE)
	String[] basePackages() default {};
	/**
	 * Type-safe alternative to {@link #basePackages} for specifying the packages
	 * to scan for annotated components. The package of each class specified will be scanned.
	 * <p>Consider creating a special no-op marker class or interface in each package
	 * that serves no purpose other than being referenced by this attribute.
	 */
	Class<?>[] basePackageClasses() default {};
	/**
	 * excluded base packages to scan for annotated components.
	 * <p>Use {@link #excludePackageClasses} for a type-safe alternative to
	 * String-based package names.
	 * <p>Ignored if not  sub package of {@link #basePackages},
	 *<p> Ignored if exists duplicated package in {@link #basePackages}
	 */
	String[] excludePackages() default {};
	Class<?>[] excludePackageClasses() default {};
	/**
	 * excluded package suffixes to scan for annotated components.<br>
	 * such as:<br>
	 * <ul>
	 * <li>'.internal' exclude package 'pkg.internal'</li>
	 * <li>'framework' exclude package 'org.apache.springframework' and ''org.apache.framework''</li>
	 * </ul>
	 *<p> Ignored if exists duplicated package in {@link #basePackages} or {@link #excludePackages}
	 */
	String[] excludePackageTails() default {};
}
